package com.gpj.learn.concurrent.jol.demo;

import com.gpj.learn.concurrent.jol.Example;
import lombok.extern.slf4j.Slf4j;
import org.openjdk.jol.info.ClassLayout;
import org.openjdk.jol.vm.VM;

/**
 * @className JolDemo1
 * @description
 *   打印对象的对象头
 * @author GPJ
 * @date 2020/6/15 8:38
 * @version 1.0
 **/
@Slf4j
public class JolDemo1 {
    public static void main(String[] args) {
        log.info("JVM 信息如下");
        log.info("{}", VM.current().details());
        log.info("{}对象的对象信息如下");
        log.info(ClassLayout.parseInstance(new Example()).toPrintable());
    }
}
